<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <tem>
            <template v-slot='obj'>{{obj.a}}</template>
        </tem>
    </div>
    <template id="tem">
        <div>
            <slot :a="msg"></slot>
            <button>{{msg}}</button>
        </div>
    </template>
    <script src="../vue.js"></script>
    <script>
        let tem={
                template:'#tem',
                data(){
                    return{
                        msg:'按钮',
                    }
                },
            };
        new Vue({
            el:'#app',
            components:{
                //tem,
                tem:tem,
            }
        })
    </script>
</body>
</html>